/*
 * 9. Modify the last program to print only the
 * sequences that consist of even number of
 * vowels.
 */

public class Main {
    public static boolean isVowel (char c) {
	if (c == 'A' || c == 'E' || c == 'I'
	    || c == 'O' || c == 'U' || c == 'Y')
	    return true;
	return false;
    }

    public static void main (String[] args) {
	for (char a = 'A'; a <= 'Z'; a++)
	    for (char b = 'A'; b <= 'Z'; b++)
		for (char c = 'A'; c <= 'Z'; c++)
		    if ((isVowel (a) || isVowel (b)) && !isVowel (c))
			System.out.printf("%1$c%2$c%3$c%2$c%1$c ", a, b, c);
	System.out.println();
    }
}
